Conventionally, in a document processing apparatus such as a word processor or the like, for planning an interface between a software and the database, a mode for saving the data in a SGML format is provided. In a SGML document in compliance with the SGML-standard, the document structure is defined according to the document type definition (DTD).
For this reason, when preparing a SGML document according to the document structure specified by the document type definition, it is necessary to add tags indicating a structural element to each of the input items in a plain text document. Accordingly, tags are inputted generally by operating a keyboard.
However, with recent technological development in a related field, there has been proposed SGML converting techniques in which a previously prepared plain text document is analyzed by software for syntaxes and tags indicating a structural element are automatically added to each of the obtained syntaxes. Examples of the technique are disclosed, for instance, in Japanese Patent Laid-Open Publication No. HEI 5-101054, Japanese Patent Laid-Open Publication No. HEI 7-44560, and in Japanese Patent Laid-Open Publication No. HEI 8-221399.
In Japanese Patent Laid-Open Publication No. HEI 5-101054, there is disclosed a technology for marking up a text document according to pre-specified document type definition, dividing the marked up text document to components, storing the components in a database, retrieving desired components from the database when a document is to be prepared, and synthesizing the components obtained through the retrieval to obtain the desired document. Also, in the Japanese Patent Laid-Open Publication No. HEI 7-44560, there is disclosed a technology for obtaining a SGML document from a marked up text document prepared according to the SGML regulations, by generating a logical structure specific to that text document.
Also, in the Japanese Patent Laid-Open Publication No. HEI 8-221399, there is disclosed a technology for obtaining a SGML document by (1) referring to correspondence between temporary tags, indicating a pre-prepared logical structure of a text document specified by a user, and a plurality of document type definitions, (2) obtaining the degree of coincidence between the original text prepared by the user using the temporary tags and each of the document type definitions, and (3) selecting one of the document type definitions displayed in the order of the degree of the coincidence thereamong by the user.
In the conventional technology, as disclosed in the publications, to prepare a desired SGML document, preparation of samples such as components, marked-up texts, and document type definitions or the like, and processing such as retrieval of the samples, synthesis thereof, generation of a logical structure, and determination of the degree of coincidence thereamong or the like, is required. This processing style is suited for SGML conversion of a text with the form not fixed, however, in the case of text documents having specific form such as a form paper or the like, the workability is low. For this reason, improvement thereof has been expected in recent years.